package net.xiangcaowuyu.springcloud.alibaba.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 博客：https://www.xiangcaowuyu.net
 * Description:
 *
 * @Author: 香草物语
 * DateTime: 2021-07-25 13:58
 */
@FeignClient(value = "nacos-provider-payment", fallback = NacosPaymentServiceFallback.class)
public interface NacosPaymentService {

    @GetMapping(value = "/echo/{string}")
    String echo(@PathVariable("string") String string);
}

class NacosPaymentServiceFallback implements NacosPaymentService {

    @Override
    public String echo(String string) {
        return "进入feignClient fallback了";
    }
}